<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>面料选择</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<script>
	function checkling() {
		var styleredio = document.getElementsByName("radiobutton");
		for ( var i = 0; i < styleredio.length; i++) {
			if (styleredio[i].checked == true) {
				var redioid = i;
				document.getElementById("liningredioid").value = i;
				var Lining_name = styleredio[i].value;
				document.getElementById("Lining_name").value = Lining_name;
				return true;
			}
		}
		alert("请选择面料！");
		return false;
	}
	function init() {
		var liningredioid='<%=session.getAttribute("liningredioid")%>';
		if(liningredioid != ''){
		if (liningredioid != 'null') {
			var styleredio = document.getElementsByName("radiobutton");
			styleredio[liningredioid].checked = true;
		}
		}
		var larghezza='<%=session.getAttribute("larghezza")%>';
		if (larghezza != 'null') {
			document.getElementById("larghezza").value = larghezza;
		} else {
			document.getElementById("larghezza").value = 90;
		}
		document.getElementById("detail").style.display="none";
	}
	function rediocheck() {
		checkling();
		var styleredio = document.getElementsByName("radiobutton");

		for ( var i = 0; i < styleredio.length; i++) {
			if (styleredio[i].checked == true) {
				document.getElementById("form1").submit();
				return true;
			}
		}
		alert("请选择面料！");
		return false;
	}
	function codefans() {
		var box = document.getElementById("divbox");
		var detail = document.getElementById("detail");
		box.style.display = "none";
		detail.style.display = "block";
	}
	setTimeout("codefans()", 3000);//3秒
</script>
</head>
<body background="../images/bg/bg.jpg" onload="init()">
	<div class="TitleDiv">
		<font class="TitleCharFont">我要买</font>

	</div>
	<div class="TitleDiv">
		<br /> <span align="center" style="width: 50%"> <span>
				<a href="../view/StyleMan.jsp"
				style="cursor: hand; cursor: pointer;"><input
					name="styleChooseButton" type="button" class="TitleNoSelectButton"
					id="styleChooseButton" value="款式选择" /></a>
		</span> <span> <a href="../view/SizeChoose.jsp"
				style="cursor: hand; cursor: pointer;"><input
					name="sizeChooseButton" type="button" class="TitleNoSelectButton"
					id="sizeChooseButton" value="尺寸选择" /></a>
		</span> <span> <a href="../view/Lining.jsp"
				style="cursor: hand; cursor: pointer;"><input
					name="liningChooseButton" type="button" class="TitleSelectButton"
					id="liningChooseButton" value="面料选择" /></a>
		</span> <span> <a href="../view/AccessoryChoose.jsp"
				style="cursor: hand; cursor: pointer;"><input
					name="accessoryChooseButton" type="button"
					class="TitleNoSelectButton" id="accessoryChooseButton" value="辅料选择" /></a>
		</span> <span><a href="../view/PriceSheet.jsp"
				style="cursor: hand; cursor: pointer;"><input
					name="priceSheetButton" type="button" class="TitleNoSelectButton"
					id="priceSheetButton" value="报价单" /> </a> </span>
		</span>
	</div>
	<form id="form1" name="form1" method="post" action="liningAction">
		<div id="divbox" class="DetailDiv">
		<table style="margin-left:23%;margin-top:17%">
		<tr><td>
		<img src="../images/loading.gif" width="104" height="119" />
							<p>正在获取数据，请稍后......</p>
		</td></tr>
		</table>
		
							</div>
		<div class="DetailDiv" id="detail">
			<input type="hidden" name="Lining_name" id="Lining_name"></input> <input
				type="hidden" name="liningredioid" id="liningredioid"></input>

			<p>
				<span><strong class="StyleChareFont">门幅：</strong><select
					size="1" id="larghezza" name="larghezza">
						<option value="90" selected="selected">90cm</option>
						<option value="110">110cm</option>
						<option value="120">120cm</option>
						<option value="144">144cm</option>
						<option value="150">150cm</option>
						<option value="160">160cm</option>
				</select></span>
			</p>
			<table width="1018" border="0">

				<tr>
					<td height="20" class="Td"><input type="radio" checked="checked"
						name="radiobutton" onclick="checkling();"
						value="精纺布料_寿星县千德千纺织有限公司_13660066929_林先生_13" /></td>
					<td class="Td"><input type="radio" name="radiobutton"
						onclick="checkling();"
						value="tr弹力西装面料_绍兴县心恩纺织品有限公司_18257509693_江先生_28" /></td>
					<td class="Td"><input type="radio" name="radiobutton"
						onclick="checkling();"
						value="T/R/SP西服面料_绍兴县利瑞纺织有限公司_13805783535_潘先生_18" /></td>
					<td class="Td"><input type="radio" name="radiobutton"
						onclick="checkling();"
						value="高支毛涤哔叽服装面料_潍坊二毛集团二毛有限公司_18764618028_马先生_57" /></td>
				</tr>
				<tr>
					<td width="250" height="137" class="Td"><label><img
							src="../images/lining/1.jpg" width="104" height="119" /></label></td>
					<td width="330" class="Td"><p>
							<img src="../images/lining/2.jpg" width="104" height="119" />
						</p></td>
					<td width="290" class="Td"><label></label> <img
						src="../images/lining/3.jpg" width="104" height="119" /></td>
					<td width="293" class="Td"><label><img
							src="../images/lining/4.jpg" width="104" height="119" /></label></td>
				</tr>
				<tr>
					<td class="Td">名称：精纺布料</td>
					<td class="Td">名称：tr弹力西装面料</td>
					<td class="Td">名称：T/R/SP西服面料</td>
					<td class="Td">名称：高支毛涤哔叽服装面料</td>
				</tr>
				<tr>
					<td class="Td">公司：寿星县千德千纺织有限公司</td>
					<td class="Td">公司：绍兴县心恩纺织品有限公司</td>
					<td class="Td">公司：绍兴县利瑞纺织有限公司</td>
					<td class="Td">公司：潍坊二毛集团二毛有限公司</td>
				</tr>
				<tr>
					<td class="Td">电话：13660066929 林先生</td>
					<td class="Td">电话：18257509693 江先生</td>
					<td class="Td">电话：13805783535 潘先生</td>
					<td class="Td">电话：18764618028 马先生</td>
				</tr>
				<tr>
					<td class="Td">价格：13元</td>
					<td class="Td">价格：28元</td>
					<td class="Td">价格：18元</td>
					<td class="Td">价格：57元</td>
				</tr>
			</table>

		</div>
		<div class="NextDiv">
			<a href="../view/SizeChoose.jsp"
				style="cursor: hand; cursor: pointer;"><input
				name="getSizeButton" type="button" class="NextButton"
				id="getSizeButton" value="上一步" /></a><input name="getSizeButton"
				type="button" class="NextButton" id="getSizeButton" value="下一步"
				onclick="rediocheck()" />
		</div>
	</form>
</body>
</html>